{template 'web/_header'}
<ul class="nav nav-tabs">
    <li {if ($_GPC['p'] == 'list' || $_GPC['p'] == '') && ($_GPC['op'] == '' || $_GPC['op'] == 'display')}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/list')}">加盟签约</a></li>
    <li {if $_GPC['p'] == 'experience_meeting' && ($_GPC['op'] == '' || $_GPC['op'] == 'display')}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/experience_meeting')}">体验会</a></li>
    <li {if $_GPC['p'] == 'experience_meeting' && $_GPC['op'] == 'edit'}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/experience_meeting',array('op'=>'edit'))}">编辑体验会</a></li>
    <li {if $_GPC['p'] == 'lesson' && ($_GPC['op'] == '' || $_GPC['op'] == 'display')}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/lesson')}">课程</a></li>
    <li {if $_GPC['p'] == 'lesson' && $_GPC['op'] == 'edit'}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/lesson',array('op'=>'edit'))}">编辑课程</a></li>
    <li {if $_GPC['p'] == 'decorate_case' && ($_GPC['op'] == '' || $_GPC['op'] == 'display')}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/decorate_case')}">装修案例</a></li>
    <li {if $_GPC['p'] == 'decorate_case' && $_GPC['op'] == 'edit'}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/decorate_case',array('op'=>'edit'))}">编辑案例</a></li>
    <li {if $_GPC['p'] == 'decorate_case' && $_GPC['op'] == 'need'}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/decorate_case',array('op'=>'need'))}">装修需求</a></li>
    <li {if $_GPC['p'] == 'activity' && ($_GPC['op'] == '' || $_GPC['op'] == 'display')}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/activity')}">开业活动</a></li>
    <li {if $_GPC['p'] == 'activity' && $_GPC['op'] == 'edit'}class="active"{/if}><a href="{php echo $this->createWebUrl('franchise/activity',array('op'=>'edit'))}">编辑活动</a></li>
    {if ($_GPC['p'] == 'list' || $_GPC['p'] == '') && $_GPC['op'] == 'detail'}<li class="active"><a href="javascript:;">订单详情</a></li>{/if}
    {if $_GPC['p'] == 'experience_meeting' && $_GPC['op'] == 'join'}<li class="active"><a href="javascript:;">会议详情</a></li>{/if}
    {if $_GPC['p'] == 'lesson' && $_GPC['op'] == 'join'}<li class="active"><a href="javascript:;">课程详情</a></li>{/if}
    {if $_GPC['p'] == 'activity' && $_GPC['op'] == 'join'}<li class="active"><a href="javascript:;">活动详情</a></li>{/if}
</ul>
{if $op == 'display'}
<form action="" method="post">
    <div class="panel panel-default">
        <div class="panel-body table-responsive">
            <table class="table table-hover">
                <thead class="navbar-inner">
                    <tr>
                        <th style="width:3%;">ID</th>
                        <th style="width:15%;">订单编号</th>
                        <th style="width:10%;">粉丝</th>
                        <th style="width:10%;">店铺类型</th>
                        <th style="width:5%;">加盟方案</th>
                        <th style="width:5%;">支付金额</th>
                        <th style="width:10%;">创建时间</th>
                        <th style="width:10%;">审核时间</th>
                        <th style="width:5%;">支付类型</th>
                        <th style="width:5%;">状态</th>
                        <th style="width:10%;">操作</th>
                    </tr>
                </thead>
                <tbody>
                    {loop $order_info $row}
                    <tr>
                        <td style="width:3%">{$row['id']}</td>
                        <td style='width:15%'>{$row['ordersn']}</td>
                        <td style='width:10%'><img src="{$row['avatar']}" style="width:40px;height:40px;border:1px solid #ccc;">{$row['nickname']}</td>
                        <td style='width:10%'>{$row['shop_type']}</td>
                        <td style='width:5%'>方案{$row['type']}</td>
                        <td style='width:5%'>{$row['price']}元</td>
                        <td style='width:10%'>{$row['createtime']}</td>
                        <td style='width:10%'>{$row['sendtime']}</td>
                        <td style='width:5%'>
                            {if $row['paytype']==21}
                            <span class='label label-success'>微信支付</span>
                            {/if}
                            {if $row['paytype']==1}
                            <span class='label label-danger'>余额支付</span>
                            {/if}
                        </td>
                        <td style='width:5%'>
                            {if $row['status']==2}
                            <span class='label label-success'>已审核</span>
                            {/if}
                            {if $row['status']==1}
                            <span class='label label-danger'>未审核</span>
                            {/if}
                        </td>
                        <td style='width:10%'>
                            <a class='btn btn-default btn-sm' href="{php echo $this->createWebUrl('franchise/list',array('op'=>'detail','order_id'=>$row['id']))}">查看详情</a>
                            {if $row['status']==1}<a class="btn btn-primary btn-sm" href="{php echo $this->createWebUrl('franchise/list',array('op'=>'open','order_id'=>$row['id']))}" onclick="return confirm('此操作不可恢复，确认吗？');
                                    return false;" >审核通过</a>{/if}
                        </td>
                    </tr>
                    {/loop}
                </tbody>
            </table>
            {$pager}
        </div>
    </div>
</form>
{/if}
{if $op == 'detail'}
<style type="text/css">

    .form-horizontal .control-label {padding-top:0px;}

</style>
<div class="main">

    <form class="form-horizontal form" action="" method="post" enctype="multipart/form-data" onsubmit="return formcheck(this)">

        <div class="panel panel-default">

            <div class="panel-heading">

                订单信息

            </div>

            <div class="panel-body">

                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">粉丝</label>

                    <div class="col-sm-9 col-xs-12">

                        <img src='{$order_detail['avatar']}' style='width:60px;height:60px;padding:1px;border:1px solid #ccc' />

                             {$order_detail['nickname']}

                    </div>

                </div>

                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">姓名：</label>

                    <div class="col-sm-9 col-xs-12 col-md-2">{$order_detail['name']}</div>

                </div>

                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">门店名称 :</label>

                    <div class="col-sm-9 col-xs-12 col-md-2">{$order_detail['shop_name']}</div>

                </div>



                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">门店地址 :</label>

                    <div class="col-sm-9 col-xs-12">{$order_detail['shop_address']} </div>

                </div>

                <div class="form-group">

                    <label class="col-xs-12 col-sm-3 col-md-2 control-label">联系电话 :</label>

                    <div class="col-sm-9 col-xs-12 col-md-2">{$order_detail['mobile']}</div>

                </div>

            </div>

        </div>
        {/if}
        {template 'web/_footer'}